package com.rmy.queue.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rmy.queue.mapper.QmsWindowBusinessMapper;
import com.rmy.queue.domain.QmsWindowBusiness;
import com.rmy.queue.service.IQmsWindowBusinessService;

/**
 * 窗口业务Service业务层处理
 *
 * @author rmy
 * @date 2022-09-30
 */
@Service
public class QmsWindowBusinessServiceImpl implements IQmsWindowBusinessService
{
    @Autowired
    private QmsWindowBusinessMapper qmsWindowBusinessMapper;

    /**
     * 查询窗口业务
     *
     * @param windowId 窗口业务主键
     * @return 窗口业务
     */
    @Override
    public QmsWindowBusiness selectQmsWindowBusinessByWindowId(Long windowId)
    {
        return qmsWindowBusinessMapper.selectQmsWindowBusinessByWindowId(windowId);
    }

    /**
     * 查询窗口业务列表
     *
     * @param qmsWindowBusiness 窗口业务
     * @return 窗口业务
     */
    @Override
    public List<QmsWindowBusiness> selectQmsWindowBusinessList(QmsWindowBusiness qmsWindowBusiness)
    {
        return qmsWindowBusinessMapper.selectQmsWindowBusinessList(qmsWindowBusiness);
    }

    /**
     * 新增窗口业务
     *
     * @param qmsWindowBusiness 窗口业务
     * @return 结果
     */
    @Override
    public int insertQmsWindowBusiness(QmsWindowBusiness qmsWindowBusiness)
    {
        return qmsWindowBusinessMapper.insertQmsWindowBusiness(qmsWindowBusiness);
    }

    /**
     * 修改窗口业务
     *
     * @param qmsWindowBusiness 窗口业务
     * @return 结果
     */
    @Override
    public int updateQmsWindowBusiness(QmsWindowBusiness qmsWindowBusiness)
    {
        return qmsWindowBusinessMapper.updateQmsWindowBusiness(qmsWindowBusiness);
    }

    /**
     * 批量删除窗口业务
     *
     * @param windowIds 需要删除的窗口业务主键
     * @return 结果
     */
    @Override
    public int deleteQmsWindowBusinessByWindowIds(Long[] windowIds)
    {
        return qmsWindowBusinessMapper.deleteQmsWindowBusinessByWindowIds(windowIds);
    }

    /**
     * 删除窗口业务信息
     *
     * @param windowId 窗口业务主键
     * @return 结果
     */
    @Override
    public int deleteQmsWindowBusinessByWindowId(Long windowId)
    {
        return qmsWindowBusinessMapper.deleteQmsWindowBusinessByWindowId(windowId);
    }

    /**
     * 删除窗口业务信息
     *
     * @param qmsWindowBusiness 窗口和业务ID
     * @return 结果
     */
    @Override
    public int deleteByWindowIdAndBusinessId(QmsWindowBusiness qmsWindowBusiness)
    {
        return qmsWindowBusinessMapper.deleteByWindowIdAndBusinessId(qmsWindowBusiness);
    }

    @Override
    public String checkWindowBusinessConfigLink(Long[] businessId) {
        return qmsWindowBusinessMapper.checkWindowBusinessConfigLink(businessId);
    }
}
